/**
 * 
 */

package com.chengyu.eyc.service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.chengyu.eyc.model.EycInspPriceRule;
import com.chengyu.eyc.model.EycInspStation;
import com.chengyu.eyc.model.EycOrder;
import com.chengyu.eyc.model.EycUser;
import com.chengyu.eyc.model.EycVehicleFile;
import com.github.pagehelper.PageInfo;

/**
 * @author kevin
 *
 */
public interface EycService {

    /**
     * @param orderNum
     * @param userId
     * @return
     */
    EycOrder cancelOrder(String orderNum, String userId);

    /**
     * 删除爱车
     * 
     * @param eycVehicleFile
     * @return
     */
    Boolean deleteVehicleFile(EycVehicleFile eycVehicleFile);

    /**
     * @param params
     * @return
     */
    List<Map<String, Object>> exportOrder(Map<String, Object> params);

    /**
     * @param eycOrder
     * @return
     */
    EycOrder insertOrder(EycOrder eycOrder);

    /**
     * 添加或修改车辆信息
     * 
     * @param eycVehicleFile
     * @return
     */
    EycVehicleFile insertOrUpdateVehicleFile(EycVehicleFile eycVehicleFile);

    /**
     * @param eycUser
     */
    EycUser insertUser(EycUser eycUser);

    List<EycInspStation> searchEycInspectionStations(Map<String, Object> params);

    /**
     * @param orderNum
     * @return
     */
    EycOrder searchEycOrderByOrderNum(String orderNum);

    /**
     * @param userId
     * @return
     */
    EycUser searchEycUserByUserIdAndUserType(String userId,String userType);

    /**
     * 查询用户下最新添加的车辆
     * 
     * @param openid
     * @return
     */
    List<EycVehicleFile> searchEycVehicleFileByUserId(String openid);

    /**
     * @param userId
     * @return
     */
    Integer searchEycVehicleFileCountByUserId(String userId);

    /**
     * @param params
     * @return
     */
    List<EycInspPriceRule> searchInspPriceRules(Map<String, Object> params);

    /**
     * @param params
     * @return
     */
    PageInfo<Map<String,Object>> searchOrders(Map<String, Object> params);

    /**
     * @param userId
     * @return
     */
    Integer searchUncompletedOrderCount(String userId);

    /**
     * 查询未支付的订单数量
     * @param userId
     * @return
     */
    Integer searchUnpaidOrderCount(String userId);

    /**
     * @param params
     * @return
     */
    PageInfo<EycUser> searchUsers(Map<String, Object> params);




    /**
     * @param id
     * @return
     */
    BigDecimal sumOrderPreferentialAmountByUserId(String id);

    /**
     * @param eycOrder
     * @return
     */
    EycOrder updateEycOrder(EycOrder eycOrder);

    /**
     * @param eycVehicleFile
     * @return
     */
    EycVehicleFile updateEycVehicleFile(EycVehicleFile eycVehicleFile);

    /**
     * @param orderNum
     * @return
     */
    EycOrder verificationOrder(String orderNum);

    /**
     * @param orderNums
     */
    Boolean verificationOrders(List<String> orderNums);

    /**
     * @param userId
     * @param plateNum
     * @return
     */
    EycVehicleFile searchEycVehicleFileByPlateNum(String userId, String plateNum);

    /**
     * @param userId
     * @return
     */
    BigDecimal sumOrderPayAmountByUserId(String userId);

    /**
     * @param appointmentDt
     * @return
     */
    int searchAppointedDayPickupCarNum(String appointmentDt);


}